#!/usr/bin/env beryl.py
# $Id: test.be ddcad87fab9c 2013/08/17 19:20:30 pgurumur $
#
# Copyright (c) 2009 Prabhu Gurumurthy  <pgurumur@gmail.com>
# 
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# __version__  = "$Revision: ddcad87fab9c $"
# __author__   = "$Author: pgurumur $"
# __modified__ = "$Date: 2013-08-17 19:20:30Z $"

print()
print("Testing beryl language!")
# Define a float variable, Example var_a = 1.2
var_a = 1.1
print("Variable name var_a, value is: %.02f", var_a)
print(var_a)

# Define a integer variable
var_b = 200000
print("Variable name var_b, value is: %d", var_b)
print(var_b)

# Define a string variable
var_c = "foobar"
print("Variable name var_c, value is %s", var_c)
print(var_c)

# Reassign defined variable value to a new variable
var_d = var_a
print("Variable name var_d, value is %.02f", var_d)
print(var_d)

# Redefine a new value to old varible
var_a = -3.14
print("Redefined variable var_a, value is %.02f", var_a)
print(var_a)

print("Mulitple definitions, var_a, var_b, var_c, %.02f, %d, %s respectivtly", 
   var_a, var_b, var_c)

print("Integer is:", 2)
print(3.14)

print("Testing String index")
var_e = var_c[2]
print("Variable var_e, value: %s", var_e)

var_f = var_c[0:5]
print("Variable var_f, value: %s", var_f)

var_g = 10
print("variable var_g, value: %d", var_g)

var_h = 120
print("variable var_h, value: %d", var_h)

var_h += 130
# var_i = 1 + var_h * 2 
# var_b |= 10 + 2
